
<div class="modal-header">
	<h3 class="modal-title">Thêm sản phẩm</h3>
</div>
<form role="form" ng-submit="addForm.$valid && ok()" name="addForm">
<div class="modal-body">
	
	<div class="form-group row">
		<div class="col-md-5">
			<label>Tên sản phẩm</label>
			<input type="text" class="form-control" ng-trim="true" required ng-model="productName" name="productName">
		</div>
	</div>
	<div class="form-group row">
		<div class="col-md-3">
			<label >Danh mục</label>
			<select class="form-control" ng-model="selectCat" name="selectCat" required ng-init="getAllCatList()" ng-change="getSubCatById()">
				<option value="" selected>-- Chọn danh mục --</option>
				<option ng-repeat="item in catTotalList" value="{{item.id}}">{{item.name}}</option>
			</select>
		</div>
	</div>
	<div class="form-group row">
		<div class="col-md-3">
			<label >Loại sản phẩm</label>
			<select class="form-control" ng-model="selectSubCat" name="selectSubCat">
				<option value="0" selected>-- Chọn loại --</option>
				<option ng-repeat="item in subCatList" value="{{item.id}}">{{item.name}}</option>
			</select>
		</div>
	</div>
	<div class="form-group row">
		<div class="col-md-3">
			<label >Giá</label>
			<input type="text" class="form-control" ng-trim="true" required ng-model="price" name="price">
		</div>
	</div>
	<div class="form-group">
		<label >Mô tả</label>
		<textarea class="form-control" rows="5" ng-trim="true" required ng-model="description" name="description"></textarea>
	</div>
	<div class="form-group row">
		<div class="col-md-3">
			<label >Ảnh sản phẩm</label>
			<button type="button" class="btn btn-primary" ng-file-select="onFileSelect($files)" data-multiple="true" title="select file" onclick="this.value = null">Chọn ảnh</button>
		</div>
		<div class="col-md-9">
			<div class="img-wp fadeInDown animated" ng-repeat="item in imageList">
				<image ng-src="{{urlList[$index]}}" />
				<a href="javascript:void(0)" ng-click="removePhoto($index)"><span class="glyphicon glyphicon-remove" ></span></a>
			</div>
		</div>
	</div>
</div>
<div class="modal-footer">
	
		

	<button type="submit" class="btn btn-primary" ng-disabled="addForm.$invalid || uploadStatus">
		<span ng-show="uploadStatus"> <span class="glyphicon glyphicon-refresh glyphicon-refresh-animate" ></span> Đang tải...</span>
		<span ng-hide="uploadStatus">Lưu</span>
	</button>
	<button class="btn btn-warning" ng-click="cancel()">Thoát</button>
</div>
</form>
